﻿@using A2.ERP.Models
@{
    v_User user = ViewBag.userInfo;
    List<dynamic> showList = new List<dynamic>()
    {
        new
        {
            title = "用户名",
            value = user.UserName
        },
        new
        {
            title = "用户类型",
            value = user.TypeName
        },
        new
        {
            title = "用户权限",
            value = user.GroupName
        },
        new
        {
            title = "姓名",
            value = user.RealName
        },
        new
        {
            title = "用户类型",
            value = string.Format("{0}--------->{1}", user.SubClassName, user.TypeName)
        },
        new
        {
            title = "联系电话",
            value = user.Tel
        },
        new
        {
            title = "电子信箱",
            value = user.Email
        },
        new
        {
            title = "淘宝（旺旺）",
            value = user.WangWang
        },
        new
        {
            title = "公司名称",
            value = user.CompanyName
        },
        new
        {
            title = "部门",
            value = user.CompanyInfo
        },
        new
        {
            title = "公司状况",
            value = user.CompanyInfo
        },
        new
        {
            title = "开户银行",
            value = user.Bankname
        },
        new
        {
            title = "开户账号",
            value = user.BankAccount
        },
        new
        {
            title = "通讯地址",
            value = user.Address
        },
        new
        {
            title = "状态",
            value = user.State == "Y" 
            ? "使用中"
            : "已停用"
        },
        new
        {
            title = "通讯地址",
            value = user.Address
        },
        new
        {
            title = "备注",
            value = user.Description
        }
    };
}

<section id="checkUser">
    <div class="card">
        <div class="card-header">
            用户信息
        </div>
        <div class="card-body">
            <table class="table">
                @foreach (var item in showList)
                {
                    <tr>
                        <td>@item.title :</td>
                        <td>@item.value</td>
                    </tr>
                }
            </table>
        </div>
    </div>
</section>